﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SQ.Calculador.Configuration
{
    public class CalculadoraSection : ConfigurationSection
    {
        [ConfigurationProperty("Instancia")]
        public string InstanciaCalculadora
        {
            get
            {
                return this["Instancia"].ToString();
            }
            set
            {
                this["Instancia"] = value;
            }
        }

        [ConfigurationProperty("Framework")]
        public FrameworkElement framework
        {
            get
            {
                return (FrameworkElement)this["Framework"];
            }
            set
            {
                this["Framework"] = value;
            }
        }
    }

    public class FrameworkElement : ConfigurationElement
    {
        [ConfigurationProperty("processamentoParalelizado")]
        public string ProcessamentoParalelizado
        {
            get
            {
                return this["processamentoParalelizado"].ToString();
            }
            set
            {
                this["processamentoParalelizado"] = value;
            }
        }

        [ConfigurationProperty("tempoPausaProcessamento")]
        public int TempoPausaProcessamento
        {
            get
            {
                return (int)this["tempoPausaProcessamento"];
            }
            set
            {
                this["tempoPausaProcessamento"] = value;
            }
        }

        [ConfigurationProperty("numeroThread")]
        public int QuantidadeThreads
        {
            get
            {
                return (int)this["numeroThread"];
            }
            set
            {
                this["numeroThread"] = value;
            }
        }
    }
}
